[AppService] Fix #33732: az webapp show: Restore appServicePlanId in output - #34149
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation addresses both reported regressions with focused compatibility coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Restores established App Service Plan identifiers in AppService command output and prevents table-formatting failures.
Changes:
- Normalizes serialized Site models for Web, Function, and Logic Apps.
- Safely handles missing plan IDs.
- Adds unit and scenario coverage.
| File | Description |
|---|---|
appservice/commands.py |
Adds output normalization and safe table formatting. |
tests/latest/test_webapp_commands.py |
Verifies Web App list/show output compatibility. |
tests/latest/test_webapp_commands_thru_mock.py |
Tests model serialization and missing-plan behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
/azp run |
|
Commenter does not have sufficient privileges for PR 34149 in repo Azure/azure-cli |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Aditya Pujara (@a0x1ab) Yong Zhang (@yonzhan) could you review this PR |
|
Please fix CI issues |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 34149 in repo Azure/azure-cli |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Finbar Ryan (FinVamp1)
left a comment
There was a problem hiding this comment.
Findings
No bugs found. Minor non-blocking nit: _rename_server_farm_props (old setattr -based mechanism in custom.py ) is now dead code for the new SDK models but still called — harmless, could be cleaned up in a follow-up but out of scope here.
Verdict: Approve. The fix is correct, well-tested, and verified empirically against the actual transform pipeline
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Related command
az webapp showaz webapp listaz functionapp list --output tableDescription
Fixes #33732
Fixes #33914
Supersedes #33733.
azure-mgmt-web11.0.0 changedSitemodels to TypeSpec-generated hybrid models. Adding an undeclaredapp_service_plan_idattribute no longer affects CLI serialization, soaz webapp show/listexposedserverFarmIdinstead of the establishedappServicePlanIdfield. The missing field also caused table formatting to raiseKeyErrorfor affected Function App responses.This change:
Sitemodels before normalizing their output.appServicePlanIdis present andserverFarmIdis removed fromaz webapp show/list.appServicePlanIdwhile retainingserverFarmIdfor Function App and Logic App compatibility.Testing Guide
Local validation:
azdev style appserviceazdev linter appservicegit diff --checkHistory Notes
[AppService]
az webapp show/list: RestoreappServicePlanIdin output[AppService]
az functionapp list --output table: Handle apps without an App Service Plan IDThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.